package de.greenrobot.daoexample.model;

import android.graphics.RectF;

import java.io.Serializable;

/**
 * Created by hy on 2015/7/3.
 */
public class TagDetail implements Serializable, Cloneable {
    private String tag_id;
    private String tag_name;
    private boolean tf_status;
    private boolean can_edit;
    private String cover;
    private int count;
    private int wf_count;
    private String event_id;
    private String type;
    private String work;
    private String wid;
    private Rect rect = new Rect();
    private String title;
    private String show_name;
    private String tf_count;
    private String intro;
    private String name;
    private String real_name;
    private boolean wf_status;
    private String id;
    private boolean ellipsize;
    private String post_count;
    private String group_count;

    public Rect getRect() {
        return rect;
    }

    public void setRect(Rect rect) {
        this.rect = rect;
    }

    public void setRect(RectF rect) {
        this.rect.left = rect.left;
        this.rect.right = rect.right;
        this.rect.top = rect.top;
        this.rect.bottom = rect.bottom;
    }

    public void setEllipsize(boolean ellipsize) {
        this.ellipsize = ellipsize;
    }

    public boolean isEllipsize() {
        return ellipsize;
    }

    public String getWork() {
        return work;
    }

    public String getWid() {
        return wid;
    }

    public void setWork(String work) {
        this.work = work;
    }

    public void setWid(String wid) {
        this.wid = wid;
    }

    public int getCount() {
        return count;
    }

    public int getWf_count() {
        return wf_count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public void setWf_count(int wf_count) {
        this.wf_count = wf_count;
    }

    public String getCover() {
        return cover;
    }

    public void setCover(String cover) {
        this.cover = cover;
    }

    public String getTag_id() {
        return tag_id;
    }

    public String getTag_name() {
        return tag_name;
    }

    public boolean isTf_status() {
        return tf_status;
    }

    public boolean isCan_edit() {
        return can_edit;
    }

    public void setTag_id(String tag_id) {
        this.tag_id = tag_id;
    }

    public void setTag_name(String tag_name) {
        this.tag_name = tag_name;
    }

    public void setTf_status(boolean tf_status) {
        this.tf_status = tf_status;
    }

    public void setCan_edit(boolean can_edit) {
        this.can_edit = can_edit;
    }

    public String getEvent_id() {
        return event_id;
    }

    public void setEvent_id(String event_id) {
        this.event_id = event_id;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getShow_name() {
        return show_name;
    }

    public void setShow_name(String show_name) {
        this.show_name = show_name;
    }

    public String getTf_count() {
        return tf_count;
    }

    public void setTf_count(String tf_count) {
        this.tf_count = tf_count;
    }

    public String getIntro() {
        return intro;
    }

    public void setIntro(String intro) {
        this.intro = intro;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getReal_name() {
        return real_name;
    }

    public void setReal_name(String real_name) {
        this.real_name = real_name;
    }

    public String getPost_count() {
        return post_count;
    }

    public void setPost_count(String post_count) {
        this.post_count = post_count;
    }

    public String getGroup_count() {
        return group_count;
    }

    public void setGroup_count(String group_count) {
        this.group_count = group_count;
    }

    public TagDetail() {
    }

    public TagDetail(String wid, String work, String tag_name) {
        this.wid = wid;
        this.work = work;
        this.tag_name = tag_name;
    }

    public TagDetail(String tag_id, String tag_name, boolean tf_status, boolean can_edit) {
        this.tag_id = tag_id;
        this.tag_name = tag_name;
        this.tf_status = tf_status;
        this.can_edit = can_edit;
    }

    public boolean isWf_status() {
        return wf_status;
    }

    public void setWf_status(boolean wf_status) {
        this.wf_status = wf_status;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Override
    public boolean equals(Object o) {
        try {
            return o.equals(this.getTag_name());
        } catch (Exception e) {
            return false;
        }
    }

    @Override
    public int hashCode() {
        return this.getTag_name().hashCode();
    }

    @Override
    public String toString() {
        return "TagDetail{" +
                "tag_id='" + tag_id + '\'' +
                ", tag_name='" + tag_name + '\'' +
                ", tf_status=" + tf_status +
                ", can_edit=" + can_edit +
                ", cover='" + cover + '\'' +
                ", count=" + count +
                ", wf_count=" + wf_count +
                ", event_id='" + event_id + '\'' +
                ", type='" + type + '\'' +
                '}';
    }

    public class Rect implements Serializable {
        public float top;
        public float left;
        public float right;
        public float bottom;

        public Rect(float top, float left, float right, float bottom) {
            this.top = top;
            this.left = left;
            this.right = right;
            this.bottom = bottom;
        }

        public Rect() {
        }
    }

    @Override
    public Object clone() {
        try {
            return super.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return null;
    }
}
